var i;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var BossComming_UIBindings = require("AA_BossComming_UIBindings");
var ResKeeper = require("AA_ResKeeper");
var AudioManager = require("AA_AudioManager");
var BundleConfig = require("AA_BundleConfig");
var _decorator = cc._decorator;
var _ccclass = _decorator.ccclass;
var _property = _decorator.property;

var _def_BossComming = function (e) {
  function _creator() {
    var t = null !== e && e.apply(this, arguments) || this;
    t.auto_ui = null;
    return t;
  }
  __extends(_creator, e);
  _creator.prototype.onLoad = function () {
    this.StartTween();
  };
  _creator.prototype.StartTween = function () {
    var e = this.auto_ui;
    e.node_headNode.runAction(cc.repeatForever(cc.sequence(cc.spawn(cc.scaleTo(1, 1.1, 1.1), cc.fadeTo(1, 180)), cc.spawn(cc.scaleTo(1, 1, 1), cc.fadeTo(1, 255)))));
    e.node_boneNode.runAction(cc.repeatForever(cc.sequence(cc.rotateTo(.125, 15), cc.rotateTo(.25, -15), cc.rotateTo(.125, 0), cc.delayTime(1))));
    e.node_ziNode.runAction(cc.repeatForever(cc.sequence(cc.scaleTo(1, 1.1, 1.1), cc.scaleTo(1, 1, 1))));
    var t = 0;
    e.node_fireNode.runAction(cc.repeatForever(cc.sequence(cc.callFunc(function () {
      e.node_fireNode.children.forEach(function (o, n) {
        o.active = n == t % e.node_fireNode.childrenCount;
      });
      t++;
    }), cc.delayTime(.25))));
  };
  _creator.prototype.onEnable = function () {};
  _creator.prototype.onDisable = function () {};
  _creator.prototype.showAni = function () {
    var e = this;
    if (!this.node.children[0].active) {
      AudioManager.AudioMgr.playEffect("game/sound/bossComming", false, BundleConfig.BundleNames.Game);
      this.node.children[0].active = true;
      var t = this.auto_ui.node_tiaoNode;
      t.setPosition(7, 101);
      t.opacity = 255;
      t.stopAllActions();
      t.runAction(cc.sequence(cc.repeat(cc.sequence(cc.moveTo(.1, t.x, t.y + 10), cc.moveTo(.2, t.x, t.y - 15), cc.moveTo(.1, t.x, t.y)), 3), cc.fadeOut(1), cc.callFunc(function () {
        e.node.children[0].active = false;
      })));
    }
  };
  __decorate([_property(BossComming_UIBindings.default)], _creator.prototype, "auto_ui", undefined);
  return __decorate([_ccclass], _creator);
}(ResKeeper.default);
exports.default = _def_BossComming;